<?php
session_start();

// includes
	include_once "%connectinclude%";
	include_once "%class_subpath%CF_pdo_com.php";
	include_once "%class_subpath%CF_form_class.php";
	include_once "%fieldinclude%";
	
// define custom class
	class %edit_class_name% extends %edit_base_class% {
	
	
	}	
	
// Use class instance
	$%edit_instance% = new %edit_class_name%($fieldspec, $testtable);
	$%edit_instance%->set_name('%cs_name%');
	$%edit_instance%->set_actionpage("%process_page%");
	$%edit_instance%->set_selfpage("%edit_page%");
	
// Get keyed row	
// Get keyed row	
	if($%edit_instance%->get_keys()){
		$mode = 'Save';
	}else{
		$mode = 'New';
	}
		
	$qry_list = "%str_query% ";
	$qry_list .= $%edit_instance%->make_keys_clause();
	print $qry_list;
	
	$array_list = get_array_query($qry_list);
	
	$%edit_instance%->set_valuesarray($array_list);
	
		
	?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>cftest form</title>

<link rel="stylesheet" href="%class_subpath%commonctls.css" type="text/css">
<style type="text/css" media="all">@import "tplcommon/qctstyle.css";</style>

</head>
<body>
 <div id="Header">
	<?php include "tplcommon/header.php" ?>
</div> <!-- End Header -->

 <div id="Menu">
<?php include "tplcommon/leftmenu.php" ?>
</div> <!-- End Menu -->

<div id="Content">
<?php echo $%edit_instance%->make_form('get',$mode); ?>

</div> <!-- End Content -->

<div id="Footer">
<?php include "tplcommon/footer.php" ?>
</div>

</body>
</html>